package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.PlayerSafeInfoDomain;
import com.idealighter.game.core.dao.generate.domain.PlayerSafeInfoDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PlayerSafeInfoDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="countByExample")
    long countByExample(PlayerSafeInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(PlayerSafeInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from player_safe_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into player_safe_info (player_id, validate_phone, ",
        "validate_email, first_pwd_protect_q, ",
        "first_pwd_protect_a, second_pwd_protect_q, ",
        "second_pwd_protect_a, login_phone_verify)",
        "values (#{playerId,jdbcType=BIGINT}, #{validatePhone,jdbcType=BIT}, ",
        "#{validateEmail,jdbcType=BIT}, #{firstPwdProtectQ,jdbcType=VARCHAR}, ",
        "#{firstPwdProtectA,jdbcType=VARCHAR}, #{secondPwdProtectQ,jdbcType=VARCHAR}, ",
        "#{secondPwdProtectA,jdbcType=VARCHAR}, #{loginPhoneVerify,jdbcType=BIT})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(PlayerSafeInfoDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(PlayerSafeInfoDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="validate_phone", property="validatePhone", jdbcType=JdbcType.BIT),
        @Result(column="validate_email", property="validateEmail", jdbcType=JdbcType.BIT),
        @Result(column="first_pwd_protect_q", property="firstPwdProtectQ", jdbcType=JdbcType.VARCHAR),
        @Result(column="first_pwd_protect_a", property="firstPwdProtectA", jdbcType=JdbcType.VARCHAR),
        @Result(column="second_pwd_protect_q", property="secondPwdProtectQ", jdbcType=JdbcType.VARCHAR),
        @Result(column="second_pwd_protect_a", property="secondPwdProtectA", jdbcType=JdbcType.VARCHAR),
        @Result(column="login_phone_verify", property="loginPhoneVerify", jdbcType=JdbcType.BIT)
    })
    List<PlayerSafeInfoDomain> selectByExample(PlayerSafeInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, player_id, validate_phone, validate_email, first_pwd_protect_q, first_pwd_protect_a, ",
        "second_pwd_protect_q, second_pwd_protect_a, login_phone_verify",
        "from player_safe_info",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="validate_phone", property="validatePhone", jdbcType=JdbcType.BIT),
        @Result(column="validate_email", property="validateEmail", jdbcType=JdbcType.BIT),
        @Result(column="first_pwd_protect_q", property="firstPwdProtectQ", jdbcType=JdbcType.VARCHAR),
        @Result(column="first_pwd_protect_a", property="firstPwdProtectA", jdbcType=JdbcType.VARCHAR),
        @Result(column="second_pwd_protect_q", property="secondPwdProtectQ", jdbcType=JdbcType.VARCHAR),
        @Result(column="second_pwd_protect_a", property="secondPwdProtectA", jdbcType=JdbcType.VARCHAR),
        @Result(column="login_phone_verify", property="loginPhoneVerify", jdbcType=JdbcType.BIT)
    })
    PlayerSafeInfoDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PlayerSafeInfoDomain record, @Param("example") PlayerSafeInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PlayerSafeInfoDomain record, @Param("example") PlayerSafeInfoDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerSafeInfoDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PlayerSafeInfoDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_safe_info
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update player_safe_info",
        "set player_id = #{playerId,jdbcType=BIGINT},",
          "validate_phone = #{validatePhone,jdbcType=BIT},",
          "validate_email = #{validateEmail,jdbcType=BIT},",
          "first_pwd_protect_q = #{firstPwdProtectQ,jdbcType=VARCHAR},",
          "first_pwd_protect_a = #{firstPwdProtectA,jdbcType=VARCHAR},",
          "second_pwd_protect_q = #{secondPwdProtectQ,jdbcType=VARCHAR},",
          "second_pwd_protect_a = #{secondPwdProtectA,jdbcType=VARCHAR},",
          "login_phone_verify = #{loginPhoneVerify,jdbcType=BIT}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PlayerSafeInfoDomain record);
}